<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <input type="text" @keyup.a='handle' v-model='info'>
    </div>
    <script src="../js/vue.js"></script>
    <script>
        //自定义按键修饰符的名称，值为ASCII码值
        Vue.config.keyCodes.a=65;
        var vm = new Vue({
            el: '#app',
            data: {
                info: ''
            },
            methods: {
                handle: function (event) {
                    console.log(event.keyCode);

                }
            },
        })
    </script>
</body>

</html>